#hello world sample for jni
LD=link
CC=cl

CFLAGS=/I"%JDK_HOME%\include" /I"%JDK_HOME%\include\win32" /Folibs\Hello.obj /c
LFLAGS=/DLL /OUT:libs\Hello.dll /MACHINE:X86 user32.lib gdi32.lib kernel32.lib

ALL:
	$(CC) $(CFLAGS) jni/Hello.cpp
	$(LD) $(LFLAGS) libs/Hello.obj

javac:
	javac -d bin src/com/singwine/jniexamples/TestJni.java
	javah -jni -classpath bin -d jni com.singwine.jniexamples.TestJni

run: 
	java -Djava.library.path=libs -classpath bin com.singwine.jniexamples.TestJni

signature:
	javap -classpath bin -s -p com.singwine.jniexamples.TestJni

clean:
	@del /F TestJni.h
	@del *.dll
	@del *.obj
	@del *.idb
	@del *.exp
	@del *.lib
	@del *.class
